//
// Created by zxh on 2020-6-16.
//

#ifndef ENVCTEL_TCPSERVER_H
#define ENVCTEL_TCPSERVER_H

#include <jni.h>
#include <string.h>

#define SIOCGIFADDR 0x8915 /* get PA address */
#define SIOCSIFADDR 0x8916 /* set PA address */
#define SIOCGIFHWADDR 0x8927 /* Get hardware address */

extern int read_data(int fd ,unsigned char *recvbuf,unsigned int len);
extern int write_data(int fd ,unsigned char * sendbuf,unsigned int len);

extern int get_ip(const char *ifname, char *ip);
extern void get_peer_ip_port(int fd, char **ip, int *port);

extern int init_tcp_server_param(void);
extern void * tcp_server_proc(void * arg);

extern unsigned char tcpClientDataBuff[256];
extern unsigned char tcpClientDataBuffLen;
#endif //ENVCTEL_TCPSERVER_H
